<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const student={
            name:"wwp",
            age:18
        }
        console.log(student.name)
        student['name']="xxx"       //[ ]是通过字符串来进行键值对访问的
        console.log(student.name)
        console.log(student['name'])
        // alert(student.age)

    </script>
</body>
</html>